<?php
if (!defined('IS_INITPHP')) exit('Access Denied!');
/*********************************************************************************
 * InitPHP 3.8.2 国产PHP开发框架   - 工具库-cookie
 *-------------------------------------------------------------------------------
 * 版权所有: CopyRight By initphp.com
 * 您可以自由使用该源码，但是在使用过程中，请保留作者信息。尊重他人劳动成果就是尊重自己
 *-------------------------------------------------------------------------------
 * Author:zhuli Dtime:2014-11-25
***********************************************************************************/
require_once 'wechat.class.php';
class weixinInit extends Wechat{
	
	private $cache ;
	public function __construct()
	{
		require_once(INITPHP_PATH . "/core/dao/cache/cache.init.php");
		$this->cache = InitPHP::loadclass('cacheInit');	
		$options = $this->cache->get('wechat_option');
		parent::__construct($options);
	}

    /**
     * 重载设置缓存
     * @param string $cachename
     * @param mixed $value
     * @param int $expired
     * @return boolean
     */
    protected function setCache($cachename,$value,$expired){
        return $this->cache->set($cachename,$value, $expired*1000);
    }

    /**
     * 重载获取缓存
     * @param string $cachename
     * @return mixed
     */
    protected function getCache($cachename){
        return $this->cache->get($cachename);
    }

    /**
     * 重载清除缓存
     * @param string $cachename
     * @return boolean
     */
    protected function removeCache($cachename){
        return $this->cache->clear($cachename);
    }

}